****************************************************************************************************
Replication files for: "Process or Candidate: The International Community and the Demand for Electoral Integrity".
****************************************************************************************************

----------------------------------------------------------------------------------------------------
FILES FOR REPLICATION OF PILOT STUDY:
----------------------------------------------------------------------------------------------------

DATASET: pilot_data.csv

VARIABLES:
- country, year, electionid (from NELDA)
- polarization, warusa, power (cf. section "DISCUSSION")
- NELDA variables (see NELDA codebook: http://www.nelda.co/#codebook)

To get the tables and graphs based on the pilot study please run: 

- 01_pilot_tables_stata.do

This produces a Table 1 in the STATA log file "log_pilot_tables_stata.log" and the file "analysis_table.csv" which is the prerequisite for running:

- 02_pilot_graph_matlab.m

This produces "figure9a.png" and "figure9b.png" in the folder "matlab_main_body".

----------------------------------------------------------------------------------------------------
FILES FOR REPLICATION OF OTHER GRAPHS:
----------------------------------------------------------------------------------------------------

To produce all graphs based on the theoretical model please run:

- 03_replication_main_body_matlab.m
- 04_replication_onlineappendix_matlab.m
- 05_replication_onlineappendix_platformchoice_matlab.m

This will create the figures in the folders "matlab_main_body" and "matlab_online_appendix". 









